Formats the subscription path, based on the topic path and subscription name.
@param topicPath - The name of the topic, including slashes.
@param subscriptionName - The name of the subscription.
@return The path of the subscription.
512708
public static String formatSubscriptionPath(String topicPath, String subscriptionName) {
        return String.join(pathDelimiter, topicPath, subscriptionsSubPath, subscriptionName);
    }
517948
public Subscription createSubscription(String topicId, String subscriptionId) throws Exception {
    // [START pubsub_create_pull_subscription]
    try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
      // eg. projectId = "my-test-project", topicId = "my-test-topic"
      ProjectTopicName topicName = ProjectTopicName.of(projectId, topicId);
      // eg. subscriptionId = "my-test-subscription"
      ProjectSubscriptionName subscriptionName =
          ProjectSubscriptionName.of(projectId, subscriptionId);
      // create a pull subscription with default acknowledgement deadline
      Subscription subscription =
          subscriptionAdminClient.createSubscription(
              subscriptionName, topicName, PushConfig.getDefaultInstance(), 0);
      return subscription;
    }
    // [END pubsub_create_pull_subscription]
  }
624492
public static Path extractSubPath(Path basePath, Path sourcePath) {
		return sourcePath.subpath(basePath.getNameCount() - 1,
				sourcePath.getNameCount());
	}
1193207
public String getContentResourcePath() {
        if (contentResourcePath != null && context != null) {
            return context.replaceDynamicContentInString(contentResourcePath);
        } else {
            return contentResourcePath;
        }
    }
373171
public static String encodePath(String path) {
        URI tmp;

        try {
            tmp = new URI("foo", "host", "/" + path, null);
        } catch (URISyntaxException e) {
            throw new IllegalStateException(e);
        }
        return tmp.getRawPath().substring(1);
    }
166333
@Override
    public Path getPath(final String first, final String... more) {

        this.checkClosed();

        if (first == null) {
            throw new IllegalArgumentException("At least one path component must be specified");
        }

        final String merged = this.merge(first, more);
        final Path path = new ShrinkWrapPath(merged, this);

        return path;
    }
20833
public function deleteSubscription($topicPath, $subscriptionName)
    {
        $httpCallContext = new HttpCallContext();
        $httpCallContext->setMethod(Resources::HTTP_DELETE);
        $httpCallContext->addStatusCode(Resources::STATUS_OK);
        $subscriptionPath = sprintf(
            Resources::SUBSCRIPTION_PATH,
            $topicPath,
            $subscriptionName
        );
        $httpCallContext->setPath($subscriptionPath);
        $this->sendHttpContext($httpCallContext);
    }
388113
public static String formatFilePath(String filePath) {
        if (filePath == null) {
            return null;
        }
        return normalizePath(filePath.replaceAll("//*", "/").replaceAll("\\*", "\\").replaceAll("/", "\\" + System.getProperty("file.separator")).replaceAll("\\\\", "\\" + System.getProperty("file.separator")), System.getProperty("file.separator").equals("/"));

    }
989032
private static String convertSub(String path) {

		if (isRestEasyPath(path)) {

			// remove {}
			path = path.substring(1, path.length() - 1);
			int index = path.lastIndexOf(":");  // check for regular expression
			if (index > 0 && index + 1 < path.length()) {
				return path.substring(index + 1); // make regular expression the path part
			}

			return ":" + path; // put : in front of param name
		}

		if (isVertxRegExPath(path)) {
			// remove parameter name - :parameter:<regularExpression>
			int idx = path.indexOf(":", 1);
			return path.substring(idx + 1);
		}

		return path;
	}
893111
private String pathToProperty(String path) {
        if (path == null || !path.startsWith("/")) {
            throw new IllegalArgumentException("Path must be prefixed with a \"/\".");
        }
        return path.substring(1);
    }
1067631
public String path(Object[] methodArguments) {
        return applySubstitutions(relativePath, pathSubstitutions, methodArguments, UrlEscapers.PATH_ESCAPER);
    }
1039295
function Subscription(name, topic) {
            this._pattern = "%s://%s.mns.%s.aliyuncs.com/topics/%s/subscriptions/%s";
            this._name = name;
            this._topic = topic;
            // make url
            this._urlAttr = this.makeAttrURL();
            // create the OpenStack object
            this._openStack = new AliMNS.OpenStack(topic.getAccount());
        }
772247
@Override
    public Path subpath(final int beginIndex, final int endIndex) {
        if (beginIndex < 0) {
            throw new IllegalArgumentException("Begin index must be greater than 0");
        }
        if (endIndex < 0) {
            throw new IllegalArgumentException("End index must be greater than 0");
        }
        if (endIndex <= beginIndex) {
            throw new IllegalArgumentException("End index must be greater than begin index");
        }
        final List<String> tokens = tokenize(this);
        final int tokenCount = tokens.size();
        if (beginIndex >= tokenCount) {
            throw new IllegalArgumentException("Invalid begin index " + endIndex + " for " + this.toString()
                + "; must be between 0 and " + tokenCount + " exclusive");
        }
        if (endIndex > tokenCount) {
            throw new IllegalArgumentException("Invalid end index " + endIndex + " for " + this.toString()
                + "; must be between 0 and " + tokenCount + " inclusive");
        }
        final StringBuilder newPathBuilder = new StringBuilder();
        for (int i = 0; i < endIndex; i++) {
            newPathBuilder.append(ArchivePath.SEPARATOR);
            newPathBuilder.append(tokens.get(i));
        }
        final Path newPath = this.fromString(newPathBuilder.toString());
        return newPath;
    }
47163
public static Path<?> getPath(Path<?> path, String propertyPath) {
        if (StringUtils.isEmpty(propertyPath)) return path;

        String name = StringUtils.substringBefore(propertyPath, PropertyUtils.PROPERTY_SEPARATOR);
        Path<?> p = path.get(name);

        return getPath(p, StringUtils.substringAfter(propertyPath, PropertyUtils.PROPERTY_SEPARATOR));

    }
93874
protected String getName(String sitePath) {

        String name = CmsResource.getName(sitePath);
        if (name.endsWith("/")) {
            name = name.substring(0, name.length() - 1);
        }
        return name;

    }
1311462
def community_topic_subscription_create(self, topic_id, data, **kwargs):
        ""
        api_path = "/api/v2/community/topics/{topic_id}/subscriptions.json"
        api_path = api_path.format(topic_id=topic_id)
        return self.call(api_path, method="POST", data=data, **kwargs)
413336
public static String formatPath(List<ChildNumber> path) {
        return PATH_JOINER.join(Iterables.concat(Collections.singleton("M"), path));
    }